﻿namespace ProgressTracker.Data.Entities
{
    public class DayTask
    {
        public virtual Day Day { get; set; }
        public virtual Task Task { get; set; }
        public virtual bool TaskComplete { get; set; }

        public override bool Equals(object obj)
        {
            var dayTask = obj as DayTask;

            if (dayTask == null)
                return false;

            return (dayTask.Day == Day) && (dayTask.Task == Task);
        }

        public override int GetHashCode()
        {
            return Day.Id ^ Task.Id;
        }
    }
}
